x86/domain: provide pv_{create,destroy}_gdt_ldt_l1tab and use them
authorWei Liu <wei.liu2@citrix.com>
Mon, 24 Apr 2017 12:05:19 +0000 (13:05 +0100)
committerWei Liu <wei.liu2@citrix.com>
Wed, 7 Jun 2017 11:15:56 +0000 (12:15 +0100)
commitba61ebe1da452c5887c54b6fbd96e6ee116570c2
tree2ab34727f866d5abf5343aaff3078bfa737b3535
parent413e92e9bf13c11ece48f379e940e45ca0fb336d
x86/domain: provide pv_{create,destroy}_gdt_ldt_l1tab and use them

This patch encapsulates the perdomain creation and destruction into
helper functions and use them where appropriate.

Since destroy_perdomain_mapping is idempotent, it is safe to call the
destruction function multiple times.

Signed-off-by: Wei Liu <wei.liu2@citrix.com>
Reviewed-by: Jan Beulich <jbeulich@suse.com>
xen/arch/x86/domain.c